package com.bougaga.opensource.scheduler.web.dto;

import jakarta.validation.constraints.Positive;

/**
 * 任务更新请求
 * 
 * @author bougaga
 * @since 1.0.0
 */
public class TaskUpdateRequest {
    
    /**
     * 任务名称
     */
    private String taskName;
    
    /**
     * 任务数据（JSON格式）
     */
    private String taskData;
    
    /**
     * 最大重试次数
     */
    @Positive(message = "Max retry count must be positive")
    private Integer maxRetryCount;
    
    /**
     * 重试间隔（毫秒）
     */
    @Positive(message = "Retry interval must be positive")
    private Long retryInterval;
    
    /**
     * 优先级（数字越小优先级越高）
     */
    private Integer priority;
    
    /**
     * 扩展属性
     */
    private String properties;
    
    // Getters and Setters
    public String getTaskName() {
        return taskName;
    }
    
    public void setTaskName(String taskName) {
        this.taskName = taskName;
    }
    
    public String getTaskData() {
        return taskData;
    }
    
    public void setTaskData(String taskData) {
        this.taskData = taskData;
    }
    
    public Integer getMaxRetryCount() {
        return maxRetryCount;
    }
    
    public void setMaxRetryCount(Integer maxRetryCount) {
        this.maxRetryCount = maxRetryCount;
    }
    
    public Long getRetryInterval() {
        return retryInterval;
    }
    
    public void setRetryInterval(Long retryInterval) {
        this.retryInterval = retryInterval;
    }
    
    public Integer getPriority() {
        return priority;
    }
    
    public void setPriority(Integer priority) {
        this.priority = priority;
    }
    
    public String getProperties() {
        return properties;
    }
    
    public void setProperties(String properties) {
        this.properties = properties;
    }
    
    @Override
    public String toString() {
        return "TaskUpdateRequest{" +
                "taskName='" + taskName + '\'' +
                ", maxRetryCount=" + maxRetryCount +
                ", retryInterval=" + retryInterval +
                ", priority=" + priority +
                '}';
    }
}
